<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="main.css">
<title>Like List</title>
<%@ page import="java.io.*"%>
<%@ page import="java.util.*" %>
<%@ page import="java.util.ArrayList"%>
<%@ page import="java.util.List"%>
<%@ page import="model.Target" %>
<%@ page import="model.Myuser" %>
<%@ page import="model.Category" %>
<%
List<Target> likelist=(List<Target>) request.getAttribute("likelist");

%>

</head>

<% String name=(String)session.getAttribute("username");

if(name==null){
    out.print("Please login first! redirecting to Login...");
    response.setHeader("Refresh","1;URL=login.jsp");
}
else{
%>

<body>
<center>
<h1>Weekend Planer -- Plan your Weekends.</h1>
<hr>
<table vertical-align: top;>
<tr style="height:50px;"></tr>
<tr>
<td  style="width:200px;">

</td>
<td  style="width:600px;" valign="top">
<table  style="width:600px;">
<tr><td><h2>Like List:</h2></td></tr>
<%
 try{
if(likelist!=null){
	for(Target t:likelist){
		String t_name=t.getTargetname();
		String targetid = Integer.toString(t.getTargetid());
		//int t_id=t.getTargetid();
		out.print("<tr><td><a href=\"TargetServlet?targetID="+targetid+"\">"+t_name+"</a></td></tr>");
	}
}
}catch(Exception e){
	e.printStackTrace();
} 
%>
</table>
</td>
<td><table style="width:200px;"><tr ><td><h4>operation</h4></td></tr>
<tr><td><a href="Home">Home</a></td></tr></table></td>
</tr>
</table>
</center>

</body>

<%} %>

</html>